﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using SilverZebra.Data;

namespace SilverZebra.Views
{
    public partial class Courses : Page
    {
        public Courses()
        {
            InitializeComponent();
            // när filen laddas , lägg till en eventlyssnare
            Loaded += new RoutedEventHandler(Courses_Loaded);
        }
        //eventlyssnare som lägger in datat från repositoryt och lägger ut det i dataformen
        void Courses_Loaded(object sender, RoutedEventArgs e)
        {
            CoursesDataForm.ItemsSource = Repository.GetCourses();
        }

      

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

    }
}
